<? 
session_start();
include('../../conexion.inc.php');
  $link=Conectarse();
mysql_select_db("gotica_sociosgotica",$link);
$username=$_SESSION['k_username']; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<? if($_SESSION['grupo']==5 ){ ?>
<link rel="stylesheet" href="../../css/stylecdm.css" type="text/css" />
<? }else{ ?>
<link rel="stylesheet" href="../../css/style1.css" type="text/css" />
<? } ?>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Maletin</title>
</head>

<body>
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000000" />
Escoge un archivo para subir: 
<input name="uploadedfile" type="file" />
<br />
<input type="submit" value="Subir" />
</form>
<h1>MI MALETIN</h1>
<table > 
<tr class="dataheader">
<td>Borrar</td>
<td>Archivo</td>
</tr>
<?
$sql="SELECT * FROM maletin WHERE user='$username'";
$result=mysql_query($sql);
while ($row = mysql_fetch_array($result)){
echo "<tr class=\"data\">";
echo "<form action=\"delfile.php\" method=\"POST\">";
echo "<td><input type=\"hidden\" name=\"ida\" value=\"$row[idarchivo]\" /><input type=\"submit\" value=\"Borrar\" /></td></form>";
echo "<td><a href='$row[file]' >$row[nombre]</a></td>";
}
?>
</table>
</body>
</html>
